<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>040-动画-单元素.html</title>
	<style>
		.fade-enter-active,.fade-leave-active{
			transition: opacity .5s;
		}
		.fade-enter,.fade-leave-to{
			opacity: 0;
		}
	</style>
</head>
<body>
	<div id="app">
		<button @click="show = !show">切换</button>
		<transition name="fade">
		<p v-if="show">say hi</p>
		</transition>
	</div>
</body>
<script src="js/vue.js"></script>
<script>
	var vm = new Vue({
		el:'#app',
		data: {
			show:true
		},
	})
</script>
</html>